800
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(1))->PutSortOrder(EXGRIDLib::SortAscending);
spGrid1->EndUpdate();
spGrid1->BeginUpdate();
spGrid1->EnsureVisibleColumn(long(0));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutExpandItem(var_Items->GetFirstVisibleItem(),VARIANT_FALSE);
spGrid1->EndUpdate();

799
Is there any public method to export the selected data

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"C1");
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C2")))->PutFormatColumn(L"1 index `A-Z`");
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C3")))->PutFormatColumn(L"100 index ``");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->PutSelectItem(var_Items->AddItem("Item 2"),VARIANT_TRUE);
	var_Items->AddItem("Item 3");
spGrid1->EndUpdate();
OutputDebugStringW( L"Export CSV Selected Items Only:" );
OutputDebugStringW( _bstr_t(spGrid1->Export("","sel")) );

798
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutScrollBars(EXGRIDLib::exDisableBoth);
spGrid1->PutScrollPartVisible(EXGRIDLib::exVScroll,EXGRIDLib::exExtentThumbPart,VARIANT_TRUE);
spGrid1->PutScrollPartVisible(EXGRIDLib::exHScroll,EXGRIDLib::exExtentThumbPart,VARIANT_TRUE);
spGrid1->PutScrollPartVisible(EXGRIDLib::ScrollBarEnum(0x2),EXGRIDLib::exExtentThumbPart,VARIANT_TRUE);
spGrid1->PutScrollWidth(4);
spGrid1->PutBackground(EXGRIDLib::exVSBack,RGB(240,240,240));
spGrid1->PutBackground(EXGRIDLib::exVSThumb,RGB(128,128,128));
spGrid1->PutScrollHeight(4);
spGrid1->PutBackground(EXGRIDLib::exHSBack,spGrid1->GetBackground(EXGRIDLib::exVSBack));
spGrid1->PutBackground(EXGRIDLib::exHSThumb,spGrid1->GetBackground(EXGRIDLib::exVSThumb));
spGrid1->PutBackground(EXGRIDLib::exScrollSizeGrip,spGrid1->GetBackground(EXGRIDLib::exVSBack));
spGrid1->EndUpdate();

797
I need to format a Column with Currency Format, but we use we are using Dhirams (AED)for the Amount. How to do this

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Name");
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Currency")));
		var_Column->PutSortType(EXGRIDLib::SortNumeric);
		var_Column->PutAllowSizing(VARIANT_FALSE);
		var_Column->PutWidth(64);
		var_Column->PutFormatColumn(L"currency(value)");
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Format")));
		var_Column1->PutSortType(EXGRIDLib::SortNumeric);
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutWidth(64);
		var_Column1->PutFormatColumn(L"`AED ` + (value format ``)");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Value 1");
	var_Items->PutCellValue(h,long(1),long(10));
	var_Items->PutCellValue(h,long(2),long(10));
	h = var_Items->AddItem("Value 2");
	var_Items->PutCellValue(h,long(1),long(20));
	var_Items->PutCellValue(h,long(2),long(20));
spGrid1->EndUpdate();

796
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Car")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilterType(EXGRIDLib::exFilter);
		var_Column->PutFilter(L"MAZDA");
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Equipment")));
		var_Column1->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column1->PutDisplayFilterPattern(VARIANT_FALSE);
		var_Column1->PutCustomFilter(L"Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*");
		var_Column1->PutFilterType(EXGRIDLib::exPattern);
		var_Column1->PutFilter(L"AIR BAG");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Mazda"),long(1),"Air Bag");
	var_Items->PutCellValue(var_Items->AddItem("Toyota"),long(1),"Air Bag,Air condition");
	var_Items->PutCellValue(var_Items->AddItem("Ford"),long(1),"Air condition");
	var_Items->PutCellValue(var_Items->AddItem("Nissan"),long(1),"Air Bag,ABS,ESP");
	var_Items->PutCellValue(var_Items->AddItem("Mazda"),long(1),"Air Bag, ABS,ESP");
	var_Items->PutCellValue(var_Items->AddItem("Mazda"),long(1),"ABS,ESP");
spGrid1->ApplyFilter();
spGrid1->EndUpdate();

795
How can I have a case-sensitive filter

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Car")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutFilterType(EXGRIDLib::FilterTypeEnum(EXGRIDLib::exFilterDoCaseSensitive | EXGRIDLib::exFilter));
		var_Column->PutFilter(L"Mazda");
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Equipment")));
		var_Column1->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column1->PutDisplayFilterPattern(VARIANT_FALSE);
		var_Column1->PutCustomFilter(L"Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*");
		var_Column1->PutFilterType(EXGRIDLib::FilterTypeEnum(EXGRIDLib::exFilterDoCaseSensitive | EXGRIDLib::exPattern));
		var_Column1->PutFilter(L"Air Bag");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Mazda"),long(1),"Air Bag");
	var_Items->PutCellValue(var_Items->AddItem("Toyota"),long(1),"Air Bag,Air condition");
	var_Items->PutCellValue(var_Items->AddItem("Ford"),long(1),"Air condition");
	var_Items->PutCellValue(var_Items->AddItem("Nissan"),long(1),"Air Bag,ABS,ESP");
	var_Items->PutCellValue(var_Items->AddItem("Mazda"),long(1),"Air Bag, ABS,ESP");
	var_Items->PutCellValue(var_Items->AddItem("Mazda"),long(1),"ABS,ESP");
spGrid1->ApplyFilter();
spGrid1->EndUpdate();

794
How can I exclude an item from aggregate/total computation

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default")))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutLockedItemCount(EXGRIDLib::exTop,1);
	long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0);
	var_Items->PutCellValue(h,long(0),"sum(all,rec,%0)");
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutFormatCell(h,long(0),L"`Sum: ` + (value format ``) ");
	var_Items->AddItem(long(10));
	h = var_Items->AddItem(long(20));
	var_Items->PutSortableItem(h,VARIANT_FALSE);
	var_Items->PutFormatCell(h,long(0),L"value + ` <fgcolor=808080> this item is excluded from aggregate computations</fgcolor>`");
	var_Items->AddItem(long(30));

793
Is is possible to change the default group header to display sum rather than count

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutHasLines(EXGRIDLib::exNoLine);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSingleSort(VARIANT_FALSE);
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(6))->PutAllowGroupBy(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem(long(1));
	var_Column->PutGroupByFormatCell(L"'<caption> (sum: <b>' + value + '</b>, of Freight)'");
	var_Column->PutGroupByTotalField(L"sum(current,rec,%6)");
	var_Column->PutSortOrder(VARIANT_TRUE);
spGrid1->EndUpdate();

792
How do I get the caption of the group during the AddGroupItem event

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		OutputDebugStringW( L"Caption:" );
		OutputDebugStringW( var_Items->GetCellCaption(Item,var_Items->GetGroupItem(Item)) );
		OutputDebugStringW( L"Value:" );
		OutputDebugStringW( _bstr_t(var_Items->GetCellValue(Item,var_Items->GetGroupItem(Item))) );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutHasLines(EXGRIDLib::exNoLine);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSingleSort(VARIANT_FALSE);
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem(long(1));
	var_Column->PutGroupByFormatCell(L"'<b><caption></b> (' + value + ') group'");
	var_Column->PutSortOrder(VARIANT_TRUE);
spGrid1->EndUpdate();

791
Is it possible, to add more aggregate functions to grouping header

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		var_Items->PutFormatCell(Item,var_Items->GetGroupItem(Item),L"value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`");
		var_Items->PutCellValue(Item,"Min","min(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Min",EXGRIDLib::exTotalField);
		var_Items->PutCellValue(Item,"Max","max(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Max",EXGRIDLib::exTotalField);
		var_Items->PutCellValue(Item,"Sum","sum(current,all,dbl(%6))");
		var_Items->PutCellValueFormat(Item,"Sum",EXGRIDLib::exTotalField);
}

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutHasLines(EXGRIDLib::exNoLine);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSingleSort(VARIANT_FALSE);
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(1))->PutSortOrder(VARIANT_TRUE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Min")))->PutVisible(VARIANT_FALSE);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Max")))->PutVisible(VARIANT_FALSE);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Sum")))->PutVisible(VARIANT_FALSE);
spGrid1->EndUpdate();

790
Is it possible to display more aggregate functions to a single cell (method 2)

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutSortOnClick(EXGRIDLib::exNoSort);
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesOutside);
spGrid1->PutIndent(13);
spGrid1->PutHeaderVisible(VARIANT_FALSE);
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Items");
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Quantity")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Sum")))->PutVisible(VARIANT_FALSE);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Min")))->PutVisible(VARIANT_FALSE);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Max")))->PutVisible(VARIANT_FALSE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Items");
	var_Items->PutCellMerge(h,long(0),long(1));
	var_Items->PutFormatCell(h,long(0),L"`Items, <b>sum(` + %2 + `), min(` + %3 + `), max(` + %4 + `)</b>`");
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML);
	var_Items->PutCellValue(h,long(2),"sum(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(2),EXGRIDLib::exTotalField);
	var_Items->PutCellValue(h,long(3),"min(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(3),EXGRIDLib::exTotalField);
	var_Items->PutCellValue(h,long(4),"max(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(4),EXGRIDLib::exTotalField);
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 1"),long(1),long(10));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 2"),long(1),long(20));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 3"),long(1),long(30));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

789
How can I use the current in the aggregate/total field

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutSortOnClick(EXGRIDLib::exNoSort);
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesOutside);
spGrid1->PutIndent(13);
spGrid1->PutHeaderVisible(VARIANT_FALSE);
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Items");
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Quantity")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Items");
	var_Items->PutCellValue(h,long(1),"sum(current,dir,dbl(%1))");
	var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::exTotalField);
	var_Items->PutFormatCell(h,long(1),L"`Total: `+ value");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 1"),long(1),long(10));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 2"),long(1),long(20));
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Item 3"),long(1),long(30));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

788
How can I prevent a specified item to be not included in the aggregate/total function

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
spGrid1->PutSortOnClick(EXGRIDLib::exNoSort);
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesOutside);
spGrid1->PutHasLines(EXGRIDLib::exThinLine);
spGrid1->PutHeaderVisible(VARIANT_FALSE);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Numbers");
	var_Items->PutCellEditorVisible(h,long(0),EXGRIDLib::exEditorHidden);
	var_Items->PutItemBold(var_Items->InsertItem(h,vtMissing,long(10)),VARIANT_TRUE);
	var_Items->PutItemBold(var_Items->InsertItem(h,vtMissing,long(20)),VARIANT_TRUE);
	var_Items->PutItemBold(var_Items->InsertItem(h,vtMissing,long(30)),VARIANT_TRUE);
	long h1 = var_Items->InsertItem(h,vtMissing,"not included");
	var_Items->PutCellEditorVisible(h1,long(0),EXGRIDLib::exEditorHidden);
	var_Items->PutCellValueFormat(h1,long(0),EXGRIDLib::exHTML);
	var_Items->PutCellHAlignment(h1,long(0),EXGRIDLib::RightAlignment);
	var_Items->PutSortableItem(h1,VARIANT_FALSE);
	h1 = var_Items->InsertItem(0,vtMissing,"sum(all,rec,dbl(%0))");
	var_Items->PutItemBold(h1,VARIANT_TRUE);
	var_Items->PutSelectableItem(h1,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h1,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutFormatCell(h1,long(0),L"`Sum: ` + value");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

787
Is is possible to specify which items/cells/fields to be included by the aggregate/total function I am using

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->GetItems()->PutSortableItem(Item,VARIANT_FALSE);
}

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedGrid1(long   Item,long   ColIndex)
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		var_Items->PutSortableItem(Item,VARIANT_FALSE);
	spGrid1->Refresh();
}

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutTreeColumnIndex(-1);
spGrid1->PutFullRowSelect(EXGRIDLib::exColumnSel);
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
spGrid1->PutSortOnClick(EXGRIDLib::exNoSort);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check Numbers")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellHasCheckBox(var_Items->AddItem(long(10)),long(0),VARIANT_TRUE);
	long h = var_Items->AddItem(long(20));
	var_Items->PutCellHasCheckBox(h,long(0),VARIANT_TRUE);
	var_Items->PutCellState(h,long(0),1);
	var_Items->PutCellHasCheckBox(var_Items->AddItem(long(30)),long(0),VARIANT_TRUE);
	h = var_Items->AddItem("sum(all,rec,dbl(%0))");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutFormatCell(h,long(0),L"`sum on checked items : ` + value");
spGrid1->EndUpdate();

786
Can I display multiple total/aggregate functions such as sum, min or max, into a single cell (method 1)

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutTreeColumnIndex(-1);
spGrid1->PutFullRowSelect(EXGRIDLib::exColumnSel);
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(10));
	var_Items->AddItem(long(20));
	var_Items->AddItem(long(30));
	long h = var_Items->AddItem("sum(all,rec,dbl(%0))");
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutFormatCell(h,long(0),L"`sum: ` + value");
	h = var_Items->GetSplitCell(h,long(0));
	var_Items->PutCellValue(long(0),h,"min(all,rec,dbl(%0))");
	var_Items->PutCellValueFormat(long(0),h,EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutFormatCell(long(0),h,L"`min: ` + value");
	h = var_Items->GetSplitCell(long(0),h);
	var_Items->PutCellValue(long(0),h,"max(all,rec,dbl(%0))");
	var_Items->PutCellValueFormat(long(0),h,EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutFormatCell(long(0),h,L"`max: ` + value");
spGrid1->EndUpdate();

785
How can I use the index of the item in total/aggregate functions, rather than root or parent

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutTreeColumnIndex(-1);
spGrid1->PutFullRowSelect(EXGRIDLib::exColumnSel);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Idx")));
	var_Column->PutFormatColumn(L"0 index ``");
	var_Column->PutWidth(24);
	var_Column->PutAllowSizing(VARIANT_FALSE);
	var_Column->PutEnabled(VARIANT_FALSE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("3 Numbers");
	var_Items->PutItemHeight(h,0);
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	var_Items->InsertItem(h,vtMissing,long(10));
	var_Items->InsertItem(h,vtMissing,long(20));
	var_Items->InsertItem(h,vtMissing,long(30));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("sum(0,dir,dbl(%0))");
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	var_Items->PutFormatCell(h,long(0),L"`sum of first three numbers is ` + value");
	h = var_Items->AddItem("3 Numbers");
	var_Items->PutItemHeight(h,0);
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	var_Items->InsertItem(h,vtMissing,long(15));
	var_Items->InsertItem(h,vtMissing,long(35));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("count(5,dir,dbl(%0))");
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutSelectableItem(h,VARIANT_FALSE);
	var_Items->PutFormatCell(h,long(0),L"`count of next two numbers is ` + value");
spGrid1->EndUpdate();

784
How can I have a better view of what current, parent, all, dir or rec means in total/aggregate fields

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesAtRoot);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("");
	var_Items->PutCellValue(h,long(0),"sum(current,dir,dbl(%0))");
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items->PutFormatCell(h,long(0),L"'sum of <fgcolor=FF0000><b>Direct</b> children: '+value + `</fgcolor> using <a>sum(current,dir,dbl(%0))`");
	var_Items->PutItemForeColor(var_Items->InsertItem(h,vtMissing,long(10)),RGB(255,0,0));
	var_Items->PutItemForeColor(var_Items->InsertItem(h,vtMissing,long(20)),RGB(255,0,0));
	var_Items->PutItemForeColor(var_Items->InsertItem(h,vtMissing,long(30)),RGB(255,0,0));
	var_Items->PutExpandItem(h,VARIANT_TRUE);
EXGRIDLib::IItemsPtr var_Items1 = spGrid1->GetItems();
	h = var_Items1->AddItem("");
	var_Items1->PutCellValue(h,long(0),"sum(current,rec,dbl(%0))");
	var_Items1->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items1->PutFormatCell(h,long(0),L"'sum of <fgcolor=00FF00><b>Leaf</b> chidlren: '+value +`</fgcolor> using <a>sum(current,rec,dbl(%0))`");
	var_Items1->PutItemForeColor(var_Items1->InsertItem(var_Items1->InsertItem(var_Items1->InsertItem(var_Items1->InsertItem(h,vtMissing,long(100)),vtMissing,long(10)),vtMissing,long(10)),vtMissing,long(1)),RGB(0,255,0));
	var_Items1->PutItemForeColor(var_Items1->InsertItem(var_Items1->InsertItem(h,vtMissing,long(200)),vtMissing,long(2)),RGB(0,255,0));
	var_Items1->PutItemForeColor(var_Items1->InsertItem(var_Items1->InsertItem(h,vtMissing,long(300)),vtMissing,long(3)),RGB(0,255,0));
	long h1 = var_Items1->InsertItem(h,vtMissing,"sum(parent,direct,%0)");
	var_Items1->PutCellValueFormat(h1,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items1->PutFormatCell(h1,long(0),L"'sum of <b>Parent Direct</b> children: '+value +`</fgcolor> using <a>sum(parent,direct,%0)`");
	h1 = var_Items1->InsertItem(h,vtMissing,"sum(parent,rec,%0)");
	var_Items1->PutCellValueFormat(h1,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items1->PutFormatCell(h1,long(0),L"'sum of <fgcolor=00FF00><b>Parent Leaf</b> children: '+value +`</fgcolor> using <a>sum(parent,rec,%0)`");
	var_Items1->PutExpandItem(0,VARIANT_TRUE);
EXGRIDLib::IItemsPtr var_Items2 = spGrid1->GetItems();
	h = var_Items2->AddItem("");
	var_Items2->PutCellValue(h,long(0),"sum(all,rec,dbl(%0))");
	var_Items2->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items2->PutFormatCell(h,long(0),L"'sum of <fgcolor=FF00FF><b>All (leaf children)</b>: '+value  +`</fgcolor> using <a>sum(all,rec,dbl(%0))`");
EXGRIDLib::IItemsPtr var_Items3 = spGrid1->GetItems();
	h = var_Items3->AddItem("");
	var_Items3->PutCellValue(h,long(0),"sum(all,all,dbl(%0))");
	var_Items3->PutCellValueFormat(h,long(0),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
	var_Items3->PutFormatCell(h,long(0),L"'sum of <fgcolor=FF00FF><b>All (children)</b>: '+value  +`</fgcolor> using <a>sum(all,all,dbl(%0))`");
spGrid1->EndUpdate();

783
Do you have any Fit-To-Page options when printing the control

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutOptions("FitToPage = On");
	var_Print->PutPrintExt(((EXGRIDLib::IGridPtr)(spGrid1)));
	var_Print->Preview();

782
How do I hide the selection

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSelForeColor(spGrid1->GetForeColor());
spGrid1->PutSelBackColor(spGrid1->GetBackColor());
spGrid1->PutShowFocusRect(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Format")));
		var_Column->PutFormatColumn(_bstr_t("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") +
"00FF>+'+(value format '2|.|3|,' ): '0.00') )");
		var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(10));
	var_Items->AddItem(long(-8));
spGrid1->EndUpdate();

781
How do I access the cells, or how do I get the values in the columns

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"C1");
	var_Columns->Add(L"C2");
	var_Columns->Add(L"C3");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Item 1");
	var_Items->PutCellValue(h,long(1),"SubItem 1.1");
	var_Items->PutCellValue(h,long(2),"SubItem 1.2");
	OutputDebugStringW( _bstr_t(var_Items->GetCellValue(h,long(2))) );

780
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings

// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedGrid1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		var_Items->ClearItemBackColor(0);
		var_Items->PutItemBackColor(var_Items->GetSelectedItem(0),RGB(128,255,255));
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutSelForeColor(spGrid1->GetForeColor());
spGrid1->PutSelBackColor(spGrid1->GetBackColor());
spGrid1->PutShowFocusRect(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Format")));
		var_Column->PutFormatColumn(_bstr_t("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") +
"00FF>+'+(value format '2|.|3|,' ): '0.00') )");
		var_Column->PutDef(EXGRIDLib::exCellValueFormat,long(1));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(10));
	var_Items->AddItem(long(-8));
spGrid1->EndUpdate();

779
How can I get the number of columns being shown in the control's SortBar part

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSingleSort(VARIANT_FALSE);
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(1))->PutSortOrder(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(2))->PutSortOrder(VARIANT_TRUE);
OutputDebugStringW( _bstr_t(spGrid1->GetColumns()->GetSortBarColumnsCount()) );
spGrid1->EndUpdate();

778
How can I add a header and footer for grouping items

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		long h = var_Items->InsertItem(Item,vtMissing,"");
		var_Items->PutSelectableItem(h,VARIANT_FALSE);
		var_Items->PutCellValue(h,long(6),"min(parent,rec,dbl(%6))");
		var_Items->PutCellValueFormat(h,long(6),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
		var_Items->PutFormatCell(h,long(6),L"`<font ;7><b>Min</b>: ` + value");
		var_Items->PutItemPosition(h,0);
		h = var_Items->InsertItem(Item,vtMissing,"");
		var_Items->PutSelectableItem(h,VARIANT_FALSE);
		var_Items->PutCellValue(h,long(6),"max(parent,rec,dbl(%6))");
		var_Items->PutCellValueFormat(h,long(6),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
		var_Items->PutFormatCell(h,long(6),L"`<font ;7><b>Max</b>: ` + value");
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutHasLines(EXGRIDLib::exNoLine);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSingleSort(VARIANT_FALSE);
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(1))->PutSortOrder(VARIANT_TRUE);
spGrid1->EndUpdate();

777
How can I add a footer for grouping items

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		long h = var_Items->InsertItem(Item,vtMissing,"");
		var_Items->PutSelectableItem(h,VARIANT_FALSE);
		var_Items->PutCellValue(h,long(6),"sum(parent,rec,dbl(%6))");
		var_Items->PutCellValueFormat(h,long(6),EXGRIDLib::ValueFormatEnum(EXGRIDLib::exTotalField | EXGRIDLib::exHTML));
		var_Items->PutFormatCell(h,long(6),L"`<font ;7><b>Sum</b>: ` + value");
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutHasLines(EXGRIDLib::exNoLine);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSingleSort(VARIANT_FALSE);
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(1))->PutSortOrder(VARIANT_TRUE);
spGrid1->EndUpdate();

776
How can I handle the event for the inside controls

// ItemOleEvent event - Fired when an ActiveX control hosted by an item has fired an event.
void OnItemOleEventGrid1(long   Item,LPDISPATCH   Ev)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Ev" );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->PutScrollBySingleLine(VARIANT_TRUE);
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->InsertControlItem(h,L"Exontrol.Grid",vtMissing);
	var_Items->PutItemHeight(h,256);
	EXGRIDLib::IGridPtr var_Grid = ((EXGRIDLib::IGridPtr)(var_Items->GetItemObject(h)));
		var_Grid->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
		var_Grid->PutScrollBySingleLine(VARIANT_TRUE);
		var_Grid->GetColumns()->Add(L"C1");
		var_Grid->GetColumns()->Add(L"C2");
		EXGRIDLib::IItemsPtr var_Items1 = var_Grid->GetItems();
			var_Items1->PutCellValue(var_Items1->AddItem(long(1)),long(1),long(2));
		h = var_Grid->GetItems()->AddItem(long(3));
		var_Grid->GetItems()->PutCellValue(h,long(1),long(4));
		EXGRIDLib::IItemsPtr var_Items2 = var_Grid->GetItems();
			var_Items2->PutExpandItem(h,VARIANT_TRUE);
			h = var_Items2->InsertControlItem(h,L"Exontrol.Grid",vtMissing);
			EXGRIDLib::IGridPtr var_Grid1 = ((EXGRIDLib::IGridPtr)(var_Items2->GetItemObject(h)));
				var_Grid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
				var_Grid1->GetColumns()->Add(L"Inside-Inside");
				EXGRIDLib::IItemsPtr var_Items3 = var_Grid1->GetItems();
					h = var_Items3->AddItem("item");
					var_Items3->InsertItem(h,vtMissing,"child 1");
					var_Items3->InsertItem(h,vtMissing,"child 2");
					var_Items3->InsertItem(h,vtMissing,"child 3");

775
How can I specify the position of the item manually (Method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Child 3");
	var_Items->AddItem("Child 2");
	var_Items->AddItem("Child 1");
	var_Items->PutItemPosition(var_Items->GetItemByIndex(0),2);
	var_Items->PutItemPosition(var_Items->GetItemByIndex(1),1);
	var_Items->PutItemPosition(var_Items->GetItemByIndex(2),0);

774
How can I specify the position of the item manually (Method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h3 = var_Items->AddItem("Child 3");
	long h2 = var_Items->AddItem("Child 2");
	long h1 = var_Items->AddItem("Child 1");
	var_Items->PutItemPosition(h3,2);
	var_Items->PutItemPosition(h2,1);
	var_Items->PutItemPosition(h1,0);

773
Is it possible to open second inside grid in inside-grid

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->PutScrollBySingleLine(VARIANT_TRUE);
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->InsertControlItem(h,L"Exontrol.Grid",vtMissing);
	var_Items->PutItemHeight(h,256);
	EXGRIDLib::IGridPtr var_Grid = ((EXGRIDLib::IGridPtr)(var_Items->GetItemObject(h)));
		var_Grid->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
		var_Grid->PutScrollBySingleLine(VARIANT_TRUE);
		var_Grid->GetColumns()->Add(L"C1");
		var_Grid->GetColumns()->Add(L"C2");
		EXGRIDLib::IItemsPtr var_Items1 = var_Grid->GetItems();
			var_Items1->PutCellValue(var_Items1->AddItem(long(1)),long(1),long(2));
		h = var_Grid->GetItems()->AddItem(long(3));
		var_Grid->GetItems()->PutCellValue(h,long(1),long(4));
		EXGRIDLib::IItemsPtr var_Items2 = var_Grid->GetItems();
			var_Items2->PutExpandItem(h,VARIANT_TRUE);
			h = var_Items2->InsertControlItem(h,L"Exontrol.Grid",vtMissing);
			EXGRIDLib::IGridPtr var_Grid1 = ((EXGRIDLib::IGridPtr)(var_Items2->GetItemObject(h)));
				var_Grid1->GetColumns()->Add(L"Inside-Inside");
				var_Grid1->GetItems()->AddItem("item");

772
Computed field concatating strings values to calculated values. Is there something we can change this

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"A");
	var_Columns->Add(L"B");
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Sum")))->PutComputedField(L"dbl(%0) + dbl(%1)");
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Concaternation")))->PutComputedField(L"str(%0) + str(%1)");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2));
	var_Items->PutCellValue(var_Items->AddItem(long(21)),long(1),long(22));

771
Is it possible the Items.FormatCell or Column.FormatColumn to use values from other columns

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"A")))->GetEditor()->PutEditType(EXGRIDLib::SpinType);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"B")))->PutFormatColumn(L"currency(%0)");
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"C")))->PutFormatColumn(L"%1 format ''");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(1));
	var_Items->AddItem(long(2));
	var_Items->AddItem(long(3));

770
Is it possible to do un-grouping the items

// Click event - Occurs when the user presses and then releases the left mouse button over the grid control.
void OnClickGrid1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Ungroup();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarHeight(24);
spGrid1->PutHeaderHeight(24);
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->PutReadOnly(EXGRIDLib::exReadOnly);
EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem(long(1));
	var_Column->PutAlignment(EXGRIDLib::CenterAlignment);
	var_Column->PutDef(EXGRIDLib::exCellBackColor,long(15790320));
	var_Column->PutSortOrder(VARIANT_TRUE);
spGrid1->EndUpdate();

769
How can I change the visual aspect of the links in the sort bar

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarHeight(24);
spGrid1->PutHeaderHeight(24);
spGrid1->PutBackColorSortBar(RGB(240,240,240));
spGrid1->PutBackColorSortBarCaption(spGrid1->GetBackColor());
spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAEGg4BdsIQAAYAQGKIYBkAKBQAGaAoDDgNw0QwAAxjMK0EwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBSFDcOwHGyQYDkCQpA") +
"AWL4tCyMc7QHKAWhrEAbJjgQYJUh+TQAAZCIJRXRQAL/K6rKwnSCQIgkUBpGKdBynEYoYxAfyESCJWyIahWAwoQjUMB1HLQAAxC5kKbkIxyBABFBdVjVeBYG78Bz+ABj" +
"EovbAMEwPBqAMwmIAZDheA4FR4AGhTXKcbxrFaXZSzKckPRoADSZq1Sg5LjDJI2ABqU6ABqNLZtJKsZS4apABrWeZ3Q7QMLdFTwA4PH6EZhxXAYbTVeaPZjQIBAgI");
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem(long(1));
	var_Column->PutAlignment(EXGRIDLib::CenterAlignment);
	var_Column->PutDef(EXGRIDLib::exCellBackColor,long(15790320));
	var_Column->PutSortOrder(VARIANT_TRUE);
EXGRIDLib::IColumnPtr var_Column1 = spGrid1->GetColumns()->GetItem(long(5));
	var_Column1->PutAlignment(EXGRIDLib::CenterAlignment);
	var_Column1->PutDef(EXGRIDLib::exCellBackColor,long(16119285));
	var_Column1->PutSortOrder(VARIANT_TRUE);
spGrid1->PutBackground(EXGRIDLib::exSortBarLinkColor,0x1000000);
spGrid1->EndUpdate();

768
Is it possible to display no +/- button for grouped items

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem(long(1));
	var_Column->PutAlignment(EXGRIDLib::CenterAlignment);
	var_Column->PutDef(EXGRIDLib::exCellBackColor,long(15790320));
spGrid1->EndUpdate();

767
How can I remove the extra information that grouped items display

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesOutside);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(6))->PutAllowGroupBy(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem(long(1));
	var_Column->PutGroupByTotalField(L"");
	var_Column->PutGroupByFormatCell(L"");
spGrid1->EndUpdate();

766
How can I change the label, caption or the formula of the grouped items

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->GetItems()->PutItemDividerLineAlignment(Item,EXGRIDLib::DividerBoth);
}

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Refresh();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutScrollBySingleLine(VARIANT_TRUE);
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesOutside);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(6))->PutAllowGroupBy(VARIANT_FALSE);
EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem(long(1));
	var_Column->PutGroupByTotalField(L"sum(current,rec,%6)");
	var_Column->PutGroupByFormatCell(L"'<font ;11>' + <caption> + '</font> <fgcolor=808080>( Freight: ' + currency(value) + ')'");
spGrid1->PutDefaultItemHeight(28);
spGrid1->EndUpdate();

765
How can I change the aspect of grouped items

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
		var_Items->PutItemDividerLine(Item,EXGRIDLib::EmptyLine);
		long l = var_Items->GetGroupItem(Item);
		var_Items->PutCellSingleLine(Item,l,EXGRIDLib::exCaptionWordWrap);
		var_Items->PutCellBold(Item,l,VARIANT_TRUE);
		var_Items->PutCellBackColor(Item,l,0x1000000);
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutScrollBySingleLine(VARIANT_TRUE);
spGrid1->PutLinesAtRoot(EXGRIDLib::exNoLinesAtRoot);
spGrid1->PutTreeColumnIndex(-1);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->GetVisualAppearance()->Add(1,_bstr_t("gBFLBCJwBAEHhEJAEGg4BKoCg6AADACAxRDAMgBQKAAzQFAYcBuGiGAAGMZhWgmFgAQhFcZQSKUOQTDKMIziaQIRDEMw5SSNIxyAK0QBkAqNQCkKKwIgmNYDSBMYABB") +
"IMBwiGQaRJnegYRDUMJCQjRVITVLMNoXDKZIyqEAHfpWVJWSLHcIhDBJUjcOYyTiOQrzCK8dB0G6bIrGEZpYRAPwEYDIIjbQhqFYDChCNLwHScEAxC4kLhnKK6Vb9d6H" +
"YhiOJYXhmDrfR7IMhyLI8QafFqXZhmOZZXizPY9T7QNB0LQ8eZbJqnahqOpaOx2W5dV7YNh2LTWGzXNq3bhuOzLbrme59X7gOB3RZeE4XRrHchxKq8XxnG6dZ7oOTUXo" +
"fFOK5WmudQTh2LpfHOO5em+doSh4LwfhOS5mnGIw9D6LxfjOW5unSIQ+D8L4flOa5yD2fg/D+L5fnOe54ByigGAKAJgEgBBrgGYIICYCoCmCSAcGOA5hAgRgSgSYQBGo" +
"FoFmGCBmBqBphGESgegeYgIgYIoHkSKIWCaCZigiJgqgqYhog4LoLmGSJGDKBZhEiVg2gMY4ImYCIBGOSJ1n6D5kAeZZ2hCZBHj4RoRl6J4eEqEpeAkNhOHaXYJEYUh0" +
"GUSRVkwchlgkZZChaZZGnWOoXmYBpOGKGJamaLhmhmWhJiYahnlmSY2G4ZZZEmRhyGMZxJlWCBhFCFgWHaHpYkmSh+GSJp6AWG4amgRoOGeIZahmEoKGyJgKDWOIXGkB" +
"wGFmJJcHkWoWHQJQqGWVoTmmRx+EuJ5eFkIoiHuJBKhWdIQGqB52D2KpgDiaougMIxqyODJrEgbgvi2YgYjKOoumKSpij4FIrFsBg0iyLBKj6RoOmqSwmimMpkCqGpOi" +
"ibQJCaII0mmWxWFCJotgoXpahWaRLHaEY3mWag6mKIpuEmFoIjmaBbiYbIgi6RhaH+O5Onmcpyh2VYAAEASAg");
spGrid1->PutDrawGridLines(EXGRIDLib::exHLines);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem(long(1));
	var_Column->PutGroupByFormatCell(L"'EmployeeID: ' + <caption> + '<br><font ;7><fgcolor=808080>Count: ' + value");
spGrid1->EndUpdate();

764
How can I remove or change the line it shows for grouped items

// AddItem event - Occurs after a new Item has been inserted to Items collection.
void OnAddItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->GetItems()->PutItemDividerLine(Item,EXGRIDLib::EmptyLine);
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->EndUpdate();

763
Is it possible to determine whether an item is regular or a group by item
// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveGrid1(short   Button,short   Shift,long   X,long   Y)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	long h = spGrid1->GetItemFromPoint(-1,-1,c,hit);
	OutputDebugStringW( _bstr_t(spGrid1->GetItems()->GetGroupItem(h)) );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->EndUpdate();

762
How can I collapse all items when the user performs a grouping

// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
void OnAddGroupItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->GetItems()->PutExpandItem(Item,VARIANT_FALSE);
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->EndUpdate();

761
Is it possible to select columns that user can drop to the sort bar, when using the Group By feature

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"<fgcolor=FF0000>Try to drag the EmployeeID column here.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(1))->PutAllowGroupBy(VARIANT_FALSE);
spGrid1->EndUpdate();

760
How can I enable the Group By support, with no sort bar

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSingleSort(VARIANT_FALSE);
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->GetColumns()->GetItem(long(1))->PutSortOrder(VARIANT_TRUE);
spGrid1->EndUpdate();

759
Does your control support Group-By feature

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutSortBarVisible(VARIANT_TRUE);
spGrid1->PutSortBarCaption(L"Drag a <b>column</b> header here to group by that column.");
spGrid1->PutAllowGroupBy(VARIANT_TRUE);
spGrid1->EndUpdate();

758
How can I restrict a field to number only (Method 3, Float)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->GetEditor();
	var_Editor->PutEditType(EXGRIDLib::EditType);
	var_Editor->PutNumeric(EXGRIDLib::exFloat);
spGrid1->GetItems()->AddItem(long(12));

757
How can I restrict a field to number only (Method 2, Integer only)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->GetEditor();
	var_Editor->PutEditType(EXGRIDLib::EditType);
	var_Editor->PutNumeric(EXGRIDLib::exInteger);
spGrid1->GetItems()->AddItem(long(12));

756
How can I restrict a field to number only (Method 1)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Numbers")))->GetEditor();
	var_Editor->PutEditType(EXGRIDLib::MaskType);
	var_Editor->PutMask(L"###.###");
spGrid1->GetItems()->AddItem(long(12));

755
Is it possible to include only leaf items ( items with no childs ) in the drop down list

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exSortItemsAsc | EXGRIDLib::exLeafItems));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

754
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Item")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilter(L"Child 1");
	var_Column->PutFilterType(EXGRIDLib::exFilter);
EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Date")));
	var_Column1->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column1->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column1->PutDisplayFilterDate(VARIANT_TRUE);
	var_Column1->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exNoItems));
	var_Column1->PutFilter(L"COleDateTime(2010,12,28,0,00,00).operator DATE()");
	var_Column1->PutFilterType(EXGRIDLib::exDate);
spGrid1->PutFilterCriteria(L"%0 or %1");
spGrid1->PutDescription(EXGRIDLib::exFilterBarOr,L"<font ;18><fgcolor=FF0000>or</fgcolor></font>");
spGrid1->PutDescription(EXGRIDLib::exFilterBarAnd,L"<font ;18><fgcolor=FF0000>and</fgcolor></font>");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),COleDateTime(2010,12,27,0,00,00).operator DATE());
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),COleDateTime(2010,12,28,0,00,00).operator DATE());
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 1"),long(1),COleDateTime(2010,12,29,0,00,00).operator DATE());
	var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Child 2"),long(1),COleDateTime(2010,12,30,0,00,00).operator DATE());
spGrid1->ApplyFilter();
spGrid1->EndUpdate();

753
Is it possible exclude the dates being selected in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Date")));
	var_Column->PutSortType(EXGRIDLib::SortDate);
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutDisplayFilterDate(VARIANT_TRUE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exNoItems));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(COleDateTime(2010,12,27,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,28,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,29,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,30,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,31,0,00,00).operator DATE());
spGrid1->EndUpdate();

752
How can I display a calendar control inside the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Date")));
	var_Column->PutSortType(EXGRIDLib::SortDate);
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutDisplayFilterDate(VARIANT_TRUE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox | EXGRIDLib::exNoItems));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(COleDateTime(2010,12,27,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,28,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,29,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,30,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,31,0,00,00).operator DATE());
spGrid1->EndUpdate();

751
Is it possible to include the dates as checkb-boxes in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Dates")));
	var_Column->PutSortType(EXGRIDLib::SortDate);
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_TRUE);
	var_Column->PutDisplayFilterDate(VARIANT_TRUE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox));
	var_Column->PutFilter(L"to 12/27/2010");
	var_Column->PutFilterType(EXGRIDLib::exDate);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(COleDateTime(2010,12,27,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,28,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,29,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,30,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,31,0,00,00).operator DATE());
spGrid1->ApplyFilter();
spGrid1->EndUpdate();

750
How can I filter items for dates before a specified date

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Dates")));
	var_Column->PutSortType(EXGRIDLib::SortDate);
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_TRUE);
	var_Column->PutDisplayFilterDate(VARIANT_TRUE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowFocusItem | EXGRIDLib::exNoItems));
	var_Column->PutFilter(L"to 12/27/2010");
	var_Column->PutFilterType(EXGRIDLib::exDate);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(COleDateTime(2010,12,27,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,28,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,29,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,30,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,31,0,00,00).operator DATE());
spGrid1->ApplyFilter();
spGrid1->EndUpdate();

749
Is it possible to filter dates

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Dates")));
	var_Column->PutSortType(EXGRIDLib::SortDate);
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_TRUE);
	var_Column->PutDisplayFilterDate(VARIANT_TRUE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowFocusItem | EXGRIDLib::exNoItems));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(COleDateTime(2010,12,27,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,28,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,29,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,30,0,00,00).operator DATE());
	var_Items->AddItem(COleDateTime(2010,12,31,0,00,00).operator DATE());
spGrid1->EndUpdate();

748
Is it possible to change the Exclude field name to something different, in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->PutDescription(EXGRIDLib::exFilterBarExclude,L"Leaving out");
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
spGrid1->EndUpdate();

747
How can I display the Exclude field in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowExclude | EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
spGrid1->EndUpdate();

746
Is it possible to show and ensure the focused item from the control, in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowFocusItem | EXGRIDLib::exShowCheckBox));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->PutSelectItem(var_Items->InsertItem(h,vtMissing,"Child 2"),VARIANT_TRUE);
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

745
Is it possible to show only blanks items with no listed items from the control

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowBlanks | EXGRIDLib::exNoItems));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spGrid1->EndUpdate();

744
How can I include the blanks items in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXGRIDLib::FilterListEnum(EXGRIDLib::exShowBlanks | EXGRIDLib::exShowCheckBox));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spGrid1->EndUpdate();

743
How can I select multiple items in the drop down filter window, using check-boxes

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXGRIDLib::exShowCheckBox);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spGrid1->EndUpdate();

742
Is it possible to allow a single item being selected in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutFilterList(EXGRIDLib::exSingleSel);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spGrid1->EndUpdate();

741
How can I display no (All) item in the drop down filter window

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->PutDescription(EXGRIDLib::exFilterBarAll,L"");
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_TRUE);
	var_Column->PutFilterList(EXGRIDLib::exNoItems);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spGrid1->EndUpdate();

740
Is it possible to display no items in the drop down filter window, so only the pattern is visible

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Items")));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_TRUE);
	var_Column->PutFilterList(EXGRIDLib::exNoItems);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
spGrid1->EndUpdate();

739
How can I show the child items with no identation

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesOutside);
spGrid1->PutIndent(12);
spGrid1->PutHasLines(EXGRIDLib::exThinLine);
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");

738
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesAtRoot);
spGrid1->PutIndent(12);
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);

737
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesOutside);
spGrid1->PutIndent(12);
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");

736
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesInsideLeaf);
spGrid1->PutIndent(12);
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);

735
Is there other ways of showing the hierarchy lines (exGroupLinesInside)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLinesInside);
spGrid1->PutIndent(12);
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);

734
Is there other ways of showing the hierarchy lines (exGroupLines)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exGroupLines);
spGrid1->PutIndent(12);
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(var_Items->InsertItem(h,vtMissing,"Child 2"),vtMissing,"SubChild 2");
	var_Items->InsertItem(h,vtMissing,"Child 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);

733
Is it possible to display a column with buttons when using exCRD format

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines);
spGrid1->PutDefaultItemHeight(36);
spGrid1->PutFullRowSelect(EXGRIDLib::exColumnSel);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Column1")));
		var_Column->PutVisible(VARIANT_FALSE);
		var_Column->GetEditor()->PutEditType(EXGRIDLib::EditType);
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Column2")));
		var_Column1->PutVisible(VARIANT_FALSE);
		var_Column1->GetEditor()->PutEditType(EXGRIDLib::EditType);
	EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Column3")));
		var_Column2->PutAlignment(EXGRIDLib::CenterAlignment);
		var_Column2->PutHeaderAlignment(EXGRIDLib::CenterAlignment);
		var_Column2->PutVisible(VARIANT_FALSE);
		var_Column2->PutDef(EXGRIDLib::exCellHasButton,VARIANT_TRUE);
		var_Column2->PutDef(EXGRIDLib::exCellButtonAutoWidth,VARIANT_TRUE);
	EXGRIDLib::IColumnPtr var_Column3 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"FormatLevel")));
		var_Column3->PutFormatLevel(L"(0/1),2:64");
		var_Column3->PutDef(EXGRIDLib::exCellFormatLevel,var_Column3->GetFormatLevel());
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Cell 1.1");
	var_Items->PutCellValue(h,long(1),"Cell 1.2");
	var_Items->PutCellValue(h,long(2),"Cell 1.3");
	h = var_Items->AddItem("Cell 2.1");
	var_Items->PutCellValue(h,long(1),"Cell 2.2");
	var_Items->PutCellValue(h,long(2),"Cell 2.3");
spGrid1->EndUpdate();

732
How can I change the check-boxes appearance

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default")));
	var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutPartialCheck(VARIANT_TRUE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
EXGRIDLib::IAppearancePtr var_Appearance = spGrid1->GetVisualAppearance();
	var_Appearance->Add(1,"XP:Button 3 12");
	var_Appearance->Add(2,"XP:Button 3 11");
	var_Appearance->Add(3,"XP:Button 3 10");
spGrid1->PutCheckImage(EXGRIDLib::Unchecked,16777216);
spGrid1->PutCheckImage(EXGRIDLib::Checked,33554432);
spGrid1->PutCheckImage(EXGRIDLib::PartialChecked,50331648);

731
Is it possible to disable the cell's editor context menu
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Edit")))->GetEditor();
	var_Editor->PutEditType(EXGRIDLib::EditType);
	var_Editor->PutOption(EXGRIDLib::exEditAllowContextMenu,VARIANT_FALSE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(long(10));
	var_Items->AddItem(long(20));

730
How can I find a value in a drop down editor

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"DropDownList")))->GetEditor();
	var_Editor->PutEditType(EXGRIDLib::DropDownListType);
	var_Editor->AddItem(1,L"DDList 1",vtMissing);
	var_Editor->AddItem(2,L"DDList 2",vtMissing);
	var_Editor->AddItem(3,L"DDList 3",vtMissing);
EXGRIDLib::IEditorPtr var_Editor1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"DropDown")))->GetEditor();
	var_Editor1->PutEditType(EXGRIDLib::DropDownType);
	var_Editor1->AddItem(1,L"DDType 1",vtMissing);
	var_Editor1->AddItem(2,L"DDType 2",vtMissing);
	var_Editor1->AddItem(3,L"DDType 3",vtMissing);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(->AddItem(long(1)),long(1),spGrid1->GetColumns()->GetItem(long(1))->GetEditor()->GetFindItem(long(1)));
	var_Items->PutCellValue(->AddItem(long(2)),long(1),spGrid1->GetColumns()->GetItem(long(1))->GetEditor()->GetFindItem(long(2)));

729
What is the difference between DropDownType and DropDownListType

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IEditorPtr var_Editor = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"DropDownList")))->GetEditor();
	var_Editor->PutEditType(EXGRIDLib::DropDownListType);
	var_Editor->AddItem(1,L"First item",vtMissing);
	var_Editor->AddItem(2,L"Second item",vtMissing);
	var_Editor->AddItem(3,L"Third item",vtMissing);
EXGRIDLib::IEditorPtr var_Editor1 = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"DropDown")))->GetEditor();
	var_Editor1->PutEditType(EXGRIDLib::DropDownType);
	var_Editor1->AddItem(1,L"First item",vtMissing);
	var_Editor1->AddItem(2,L"Second item",vtMissing);
	var_Editor1->AddItem(3,L"Third item",vtMissing);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),"Any");
	var_Items->PutCellValue(var_Items->AddItem(long(2)),long(1),"Any");

728
How can I add or change the padding (spaces) for captions in the control's header

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Padding-Left")))->PutDef(EXGRIDLib::exHeaderPaddingLeft,long(18));
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Padding-Right")));
	var_Column->PutDef(EXGRIDLib::exHeaderPaddingRight,long(18));
	var_Column->PutHeaderAlignment(EXGRIDLib::RightAlignment);
spGrid1->EndUpdate();

727
Do you have any plans to add cell spacing and cell padding to the cells

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines);
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Padding-Left")));
	var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE);
	var_Column->PutDef(EXGRIDLib::exCellPaddingLeft,long(18));
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"No-Padding")))->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Empty")))->PutPosition(0);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("Item A.1"),long(1),"Item A.2");
	var_Items->PutCellValue(var_Items->AddItem("Item B.1"),long(1),"Item B.2");
	var_Items->PutCellValue(var_Items->AddItem("Item C.1"),long(1),"Item C.2");
spGrid1->EndUpdate();

726
Is it possible to change the height for all items at once

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->GetColumns()->Add(L"Items");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Root 1");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	h = var_Items->AddItem("Root 2");
	var_Items->InsertItem(h,vtMissing,"Child 1");
	var_Items->InsertItem(h,vtMissing,"Child 2");
	var_Items->PutExpandItem(0,VARIANT_TRUE);
spGrid1->EndUpdate();
spGrid1->PutDefaultItemHeight(12);
spGrid1->GetItems()->PutItemHeight(0,12);

725
Can I display somehow the filter just on the top of the list, with an editor associated to each column

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Locked:" );
	OutputDebugStringW( _bstr_t(spGrid1->GetItems()->GetIsItemLocked(Item)) );
	EXGRIDLib::IColumnPtr var_Column = spGrid1->GetColumns()->GetItem(ColIndex);
		var_Column->PutFilter(L"NewValue");
		var_Column->PutFilterType(EXGRIDLib::exPattern);
	spGrid1->ApplyFilter();
}

// MouseUp event - Occurs when the user releases a mouse button.
void OnMouseUpGrid1(short   Button,short   Shift,long   X,long   Y)
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->Edit(spGrid1->GetItems()->GetLockedItem(EXGRIDLib::exTop,0));
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
spGrid1->PutScrollBySingleLine(VARIANT_TRUE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutLockedItemCount(EXGRIDLib::exTop,2);
	long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0);
	var_Items->GetCellEditor(h,long(0))->PutEditType(EXGRIDLib::EditType);
	h = var_Items->GetLockedItem(EXGRIDLib::exTop,1);
	var_Items->PutItemHeight(h,4);
	var_Items->PutItemDivider(h,0);
	var_Items->PutSelectableItem(h,VARIANT_FALSE);

724
Is it possible to display information about the firing events
// Event event - Notifies the application once the control fires an event.
void OnEventGrid1(long   EventID)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( _bstr_t(spGrid1->GetEventParam(-2)) );
}


723
How can I change the layout of my columns when using the exCRD

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines);
spGrid1->PutDefaultItemHeight(36);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Column1")));
		var_Column->PutVisible(VARIANT_FALSE);
		var_Column->GetEditor()->PutEditType(EXGRIDLib::EditType);
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Column2")));
		var_Column1->PutVisible(VARIANT_FALSE);
		var_Column1->GetEditor()->PutEditType(EXGRIDLib::EditType);
	((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Column3")))->PutVisible(VARIANT_FALSE);
	EXGRIDLib::IColumnPtr var_Column2 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"FormatLevel")));
		var_Column2->PutFormatLevel(L"(0/1),2");
		var_Column2->PutDef(EXGRIDLib::exCellFormatLevel,var_Column2->GetFormatLevel());
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Cell 1.1");
	var_Items->PutCellValue(h,long(1),"Cell 1.2");
	var_Items->PutCellValue(h,long(2),"Cell 1.3");
	h = var_Items->AddItem("Cell 2.1");
	var_Items->PutCellValue(h,long(1),"Cell 2.2");
	var_Items->PutCellValue(h,long(2),"Cell 2.3");
spGrid1->EndUpdate();

722
Is it possible to scroll the control's content by clicking and moving the mouse up or down

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragScroll);
spGrid1->EndUpdate();

721
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spGrid1->PutHTMLPicture(L"p1","c:\\exontrol\\images\\card.png");
spGrid1->PutHTMLPicture(L"p2","c:\\exontrol\\images\\sun.png");
spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragCopySnapShot);
spGrid1->PutLinesAtRoot(EXGRIDLib::exNoLinesAtRoot);
spGrid1->PutHasLines(EXGRIDLib::exThinLine);
spGrid1->PutShowFocusRect(VARIANT_FALSE);
spGrid1->PutDefaultItemHeight(26);
spGrid1->GetColumns()->Add(L"Task");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("<img>p1:32</img>Group 1");
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	h = var_Items->AddItem("<img>p2:32</img>Group 2");
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemDivider(h,0);
	h1 = var_Items->InsertItem(h,vtMissing,"Task");
	var_Items->PutExpandItem(0,VARIANT_TRUE);
spGrid1->EndUpdate();

720
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutHTMLPicture(L"p1",_bstr_t("gCJKBOI4NBQaBQAhQNJJIIhShQAIERFQIA0RAYGLriiIEM5BJpBiIARYlMBNhQPLhJIhBKhoQLlTTLV4la5VYx/fZVOoee7de62drYdI4YIWcIteIQEbEEAzCghEwIR") +
"IZKSmJD8EIZMzARgZKYmEAmDISYgEAISIJKdg4JzSOK7bp9b73HiqezeNYxLD7Th7N67dpmQSQIZJUpzVRqT46PY9Xy1yL2Qz/c6HXbzHoAKYgWrzC7tZDtLgBOpzOaj" +
"QApWDXZwOdABb6eHa+fCHMTCB7AMo7S6AIxMcADcAIfHEe6AQ7/G7zfhfHqeAb/AJ8B6TfITMAVGLrd4Db78aY/fydH77axfPjjS5fP7tcLMY6EOYed4dbyHcwHCoHfA" +
"ICCApOHEDgcA+OAnACAJgBya5jAoLh5hCc4OGcQ47GeQIBneNoGHaTI5kAKxOHuHAzjGXp5mwAZgnyNB/nCPh9g+ABinGYA1kmGYAAqThjgGQRwHiThPC8Vhfnma5/ng" +
"XZvn8ew7keQBfmOUAYCIBj7ngbY/nqS4/nkDYzieXwLn+dp+j+EpiE8CAAEKNwZFOTZ3FCOpgHyRQHkCcAJmUDRzgEHwhAYHoRAGHxADuCAxAeDxOAcHA3jmRw4guaoa" +
"mcbZMAwM4EDWTkNgGqQqHYPJEDmKhrDwB4QmcKAsgkcQGGQHBLiYfBGjcCESFATIID0KgDjgBJ3hGVQVk4JZqHcbpklef58g+fwFScd09j+AwnECWY0FeEIBFmdIyAsZ" +
"4fHyEIRB6Ch4F8UZLDWdQ5CAAheEOTAxGmWgDhqYIaEGO4AgiAYNm8RhwACKo4HaCgviCHptB4Uo9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mClAyAYDFDLDKDqDrB1BKD/BnAADtCOCxD1" +
"DLZnCEAAgZAABJBFBOBECuBCBgCCEBA==");
_variant_t var_HTMLPicture = spGrid1->GetHTMLPicture(L"aka1");
spGrid1->PutHeaderHeight(24);
spGrid1->PutDefaultItemHeight(48);
spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines);
spGrid1->PutGridLineColor(RGB(240,240,240));
spGrid1->PutSelBackMode(EXGRIDLib::exTransparent);
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->GetColumns()->GetItem(long(0))->PutDef(EXGRIDLib::exCellValueFormat,long(1));
spGrid1->GetColumns()->GetItem(long(0))->PutFormatColumn(L"value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`");
spGrid1->GetColumns()->GetItem(long(0))->PutWidth(112);
spGrid1->GetColumns()->GetItem(long(1))->PutDef(EXGRIDLib::exCellHasCheckBox,long(1));
spGrid1->GetColumns()->GetItem(long(2))->PutLevelKey("1");
spGrid1->GetColumns()->GetItem(long(3))->PutLevelKey("1");
spGrid1->GetColumns()->GetItem(long(4))->PutLevelKey("1");
spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragCopyImage);
spGrid1->PutSingleSel(VARIANT_FALSE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->GetItemByIndex(1);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(2);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(3);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1);
	h = var_Items->GetLockedItem(EXGRIDLib::exBottom,0);
	var_Items->PutCellValue(h,long(1),"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ...");
	var_Items->PutCellSingleLine(h,long(1),EXGRIDLib::exCaptionWordWrap);
	var_Items->PutCellValueFormat(h,long(1),EXGRIDLib::exHTML);
	var_Items->PutCellHAlignment(h,long(1),EXGRIDLib::CenterAlignment);
	var_Items->PutItemDivider(h,1);
	var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerTop);
spGrid1->EndUpdate();

719
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutColumnAutoResize(VARIANT_FALSE);
spGrid1->PutContinueColumnScroll(VARIANT_FALSE);
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'

	#import <msado15.dll> rename("EOF","REOF")
*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADOR.Recordset");
	rs->Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExGrid\\Sample\\Access\\misc.accdb",ADODB::adOpenStatic,ADODB::adLockOptimistic,0);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
spGrid1->GetColumns()->GetItem(long(2))->PutLevelKey("1");
spGrid1->GetColumns()->GetItem(long(3))->PutLevelKey("1");
spGrid1->GetColumns()->GetItem(long(4))->PutLevelKey("1");
spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragCopyText);
spGrid1->PutSingleSel(VARIANT_FALSE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->GetItemByIndex(1);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(3);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(4);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	h = var_Items->GetItemByIndex(5);
	var_Items->PutSelectItem(h,VARIANT_TRUE);
	var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1);
	h = var_Items->GetLockedItem(EXGRIDLib::exBottom,0);
	var_Items->PutCellValue(h,long(0),"<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ...");
	var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionWordWrap);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemDividerLineAlignment(h,EXGRIDLib::DividerTop);
spGrid1->EndUpdate();

718
Is it possible to change the indentation during the drag and drop

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragPositionAny);
spGrid1->PutLinesAtRoot(EXGRIDLib::exNoLinesAtRoot);
spGrid1->PutHasLines(EXGRIDLib::exSolidLine);
spGrid1->PutHasButtons(EXGRIDLib::exWPlus);
spGrid1->PutShowFocusRect(VARIANT_FALSE);
spGrid1->PutSelBackMode(EXGRIDLib::exTransparent);
spGrid1->GetColumns()->Add(L"Task");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemDivider(h,0);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	long h2 = var_Items->InsertItem(h1,vtMissing,"Task 2");
	h2 = var_Items->InsertItem(h1,vtMissing,"Task 3");
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	var_Items->PutExpandItem(h1,VARIANT_TRUE);
	h = var_Items->AddItem("Group 2");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemDivider(h,0);
	var_Items->PutLockedItemCount(EXGRIDLib::exBottom,1);
	h = var_Items->GetLockedItem(EXGRIDLib::exBottom,0);
	var_Items->PutCellValue(h,long(0),_bstr_t("Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the i") +
"ndentation.");
	var_Items->PutCellSingleLine(h,long(0),EXGRIDLib::exCaptionWordWrap);
	var_Items->PutCellValueFormat(h,long(0),EXGRIDLib::exHTML);
spGrid1->EndUpdate();

717
Is it possible to allow moving an item to another, but keeping its indentation

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragPositionKeepIndent);
spGrid1->PutLinesAtRoot(EXGRIDLib::exNoLinesAtRoot);
spGrid1->PutHasLines(EXGRIDLib::exThinLine);
spGrid1->PutShowFocusRect(VARIANT_FALSE);
spGrid1->GetColumns()->Add(L"Task");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("Group 1");
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemBold(h,VARIANT_TRUE);
	long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
	long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
	long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
	h = var_Items->AddItem("Group 2");
	var_Items->PutItemBold(h,VARIANT_TRUE);
	var_Items->PutItemDivider(h,0);
spGrid1->EndUpdate();

716
How can I change the row's position to another, by drag and drop. Is it possible

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
spGrid1->PutAutoDrag(EXGRIDLib::exAutoDragPosition);
spGrid1->GetColumns()->Add(L"Task");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h1 = var_Items->AddItem("Task 1");
	long h2 = var_Items->AddItem("Task 2");
	long h3 = var_Items->AddItem("Task 3");
spGrid1->EndUpdate();

715
Is it possible background color displayed when the mouse passes over an item

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"Def");
spGrid1->PutHotBackColor(RGB(0,0,128));
spGrid1->PutHotForeColor(RGB(255,255,255));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Item A");
	var_Items->AddItem("Item B");
	var_Items->AddItem("Item C");
spGrid1->EndUpdate();

714
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"Task");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Task 1");
	var_Items->AddItem("Task 2");
spGrid1->EndUpdate();
spGrid1->PutTemplate(L"Dim p;p = CreateObject(`Exontrol.Print`);p.PrintExt = Me;p.AutoRelease = False;p.Preview();");

713
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Task 2");
spGrid1->EndUpdate();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'

	#import <ExPrint.dll>
	using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
	var_Print->PutPrintExt(((EXGRIDLib::IGridPtr)(spGrid1->ExecuteTemplate(L"me"))));
	var_Print->Preview();

712
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1","K1");
	var_ConditionalFormat->PutBackColor(RGB(255,0,0));
	var_ConditionalFormat->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x1));
EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat1 = spGrid1->GetConditionalFormats()->Add(L"1","K2");
	var_ConditionalFormat1->PutBackColor(RGB(255,0,0));
	var_ConditionalFormat1->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x2));
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Column 1");
	var_Columns->Add(L"Column 2");
	var_Columns->Add(L"Column 3");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(vtMissing);
	var_Items->AddItem(vtMissing);
	var_Items->AddItem(vtMissing);
spGrid1->EndUpdate();

711
Is it possible to add new records and see them in the control's view using the DataSource

// ButtonClick event - Occurs when user clicks on the cell's button.
void OnButtonClickGrid1(long   Item,long   ColIndex,VARIANT   Key)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'ADODB' for the library: 'Microsoft ActiveX Data Objects 6.1 Library'
		#import <msado15.dll> rename("EOF","REOF")
	*/
	ADODB::_RecordsetPtr var_Recordset = ((ADODB::_RecordsetPtr)(spGrid1->GetDataSource()));
		var_Recordset->AddNew("Task","New-Task");
		var_Recordset->Update(vtMissing,vtMissing);
}

// Error event - Fired when an internal error occurs.
void OnErrorGrid1(long   Error,LPCTSTR   Description)
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Description" );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
/*
	Includes the definition for CreateObject function like follows:

	#include <comdef.h>
	IUnknownPtr CreateObject( BSTR Object )
	{
		IUnknownPtr spResult;
		spResult.CreateInstance( Object );
		return spResult;
	};

*/
ADODB::_RecordsetPtr rs = ::CreateObject(L"ADODB.Recordset");
	rs->Append(L"Task",ADODB::adBSTR,0,vtMissing,vtMissing);
	rs->Append(L"Start",ADODB::adDate,0,vtMissing,vtMissing);
	rs->Append(L"End",ADODB::adDate,0,vtMissing,vtMissing);
rs->Open(vtMissing,vtMissing,vtMissing,vtMissing,0);
spGrid1->PutDrawGridLines(EXGRIDLib::exRowLines);
spGrid1->PutDetectAddNew(VARIANT_TRUE);
spGrid1->PutDetectDelete(VARIANT_TRUE);
spGrid1->PutDataSource(((ADODB::_RecordsetPtr)(rs)));
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutLockedItemCount(EXGRIDLib::exTop,1);
	long h = var_Items->GetLockedItem(EXGRIDLib::exTop,0);
	var_Items->PutItemDivider(h,0);
	var_Items->PutItemHeight(h,22);
	var_Items->PutCellValue(h,long(0),"AddNew");
	var_Items->PutCellHasButton(h,long(0),VARIANT_TRUE);
	var_Items->PutCellHAlignment(h,long(0),EXGRIDLib::CenterAlignment);

710
How can I initiate an OLE Drag and Drop operation in /COM version

// OLEStartDrag event - Occurs when the OLEDrag method is called.
void OnOLEStartDragGrid1(LPDISPATCH   Data,long FAR*   AllowedEffects)
{
	// Data.SetData("your data to drag")
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	AllowedEffects = 2;
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->GetColumns()->Add(L"Default");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Item 1");
	var_Items->AddItem("Item 2");
	var_Items->AddItem("Item 3");
	var_Items->AddItem("Item 4");
	var_Items->AddItem("Item 5");
spGrid1->PutOLEDropMode(EXGRIDLib::exOLEDropManual);
spGrid1->EndUpdate();

709
How can I find the order of the events
// AfterExpandItem event - Fired after an item is expanded (collapsed).
void OnAfterExpandItemGrid1(long   Item)
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"AfterExpandItem" );
	OutputDebugStringW( L"Item" );
}

// AnchorClick event - Occurs when an anchor element is clicked.
void OnAnchorClickGrid1(LPCTSTR   AnchorID,LPCTSTR   Options)
{
	OutputDebugStringW( L"AnchorClick" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"AnchorID" );
	OutputDebugStringW( L"Options" );
}

// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
void OnBeforeExpandItemGrid1(long   Item,VARIANT FAR*   Cancel)
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"BeforeExpandItem" );
	OutputDebugStringW( L"Item" );
}

// ButtonClick event - Occurs when user clicks on the cell's button.
void OnButtonClickGrid1(long   Item,long   ColIndex,VARIANT   Key)
{
	OutputDebugStringW( L"ButtonClick" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Item" );
	OutputDebugStringW( L"ColIndex" );
	OutputDebugStringW( L"Key" );
}

// CellImageClick event - Fired after the user clicks on the image's cell area.
void OnCellImageClickGrid1(long   Item,long   ColIndex)
{
	OutputDebugStringW( L"CellImageClick" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Item" );
	OutputDebugStringW( L"ColIndex" );
}

// CellStateChanged event - Fired after cell's state has been changed.
void OnCellStateChangedGrid1(long   Item,long   ColIndex)
{
	OutputDebugStringW( L"CellStateChanged" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Item" );
	OutputDebugStringW( L"ColIndex" );
}

// Change event - Occurs when the user changes the cell's content.
void OnChangeGrid1(long   Item,long   ColIndex,VARIANT FAR*   NewValue)
{
	OutputDebugStringW( L"Change" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Item" );
	OutputDebugStringW( L"ColIndex" );
	OutputDebugStringW( L"NewValue" );
}

// Click event - Occurs when the user presses and then releases the left mouse button over the grid control.
void OnClickGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Click" );
}

// ColumnClick event - Fired after the user clicks on column's header.
void OnColumnClickGrid1(LPDISPATCH   Column)
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"ColumnClick" );
}

// DblClick event - Occurs when the user dblclk the left mouse button over an object.
void OnDblClickGrid1(short   Shift,long   X,long   Y)
{
	OutputDebugStringW( L"DblClick" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Shift" );
	OutputDebugStringW( L"X" );
	OutputDebugStringW( L"Y" );
	spGrid1->Edit(vtMissing);
}

// Edit event - Occurs just before editing the focused cell.
void OnEditGrid1(long   Item,long   ColIndex,BOOL FAR*   Cancel)
{
	OutputDebugStringW( L"Edit" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Item" );
	OutputDebugStringW( L"ColIndex" );
}

// EditClose event - Occurs when the edit operation ends.
void OnEditCloseGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"EditClose" );
}

// EditOpen event - Occurs when the edit operation starts.
void OnEditOpenGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"EditOpen" );
}

// FilterChange event - Occurs when filter was changed.
void OnFilterChangeGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"FilterChange" );
}

// FilterChanging event - Notifies your application that the filter is about to change.
void OnFilterChangingGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"FilterChanging" );
}

// FocusChanged event - Occurs when a new cell is focused.
void OnFocusChangedGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"FocusChanged" );
}

// KeyDown event - Occurs when the user presses a key while an object has the focus.
void OnKeyDownGrid1(short FAR*   KeyCode,short   Shift)
{
	OutputDebugStringW( L"KeyDown" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"KeyCode" );
	OutputDebugStringW( L"Shift" );
}

// KeyPress event - Occurs when the user presses and releases an ANSI key.
void OnKeyPressGrid1(short FAR*   KeyAscii)
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"KeyPress" );
	OutputDebugStringW( L"KeyAscii" );
}

// KeyUp event - Occurs when the user releases a key while an object has the focus.
void OnKeyUpGrid1(short FAR*   KeyCode,short   Shift)
{
	OutputDebugStringW( L"KeyUp" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"KeyCode" );
	OutputDebugStringW( L"Shift" );
}

// LayoutChanged event - Occurs when column's position or column's size is changed.
void OnLayoutChangedGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"LayoutChanged" );
}

// MouseDown event - Occurs when the user presses a mouse button.
void OnMouseDownGrid1(short   Button,short   Shift,long   X,long   Y)
{
	OutputDebugStringW( L"MouseDown" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Button" );
	OutputDebugStringW( L"Shift" );
	OutputDebugStringW( L"X" );
	OutputDebugStringW( L"Y" );
}

// MouseMove event - Occurs when the user moves the mouse.
void OnMouseMoveGrid1(short   Button,short   Shift,long   X,long   Y)
{
}

// MouseUp event - Occurs when the user releases a mouse button.
void OnMouseUpGrid1(short   Button,short   Shift,long   X,long   Y)
{
	OutputDebugStringW( L"MouseUp" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Button" );
	OutputDebugStringW( L"Shift" );
	OutputDebugStringW( L"X" );
	OutputDebugStringW( L"Y" );
}

// OffsetChanged event - Occurs when the scroll position has been changed.
void OnOffsetChangedGrid1(BOOL   Horizontal,long   NewVal)
{
	OutputDebugStringW( L"OffsetChanged" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Horizontal" );
	OutputDebugStringW( L"NewVal" );
}

// OversizeChanged event - Occurs when the right range of the scroll has been changed.
void OnOversizeChangedGrid1(BOOL   Horizontal,long   NewVal)
{
	OutputDebugStringW( L"OversizeChanged" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Horizontal" );
	OutputDebugStringW( L"NewVal" );
}

// RClick event - Fired when right mouse button is clicked
void OnRClickGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"RClick" );
}

// ScrollButtonClick event - Occurs when the user clicks a button in the scrollbar.
void OnScrollButtonClickGrid1(long   ScrollBar,long   ScrollPart)
{
	OutputDebugStringW( L"ScrollButtonClick" );
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"ScrollBar" );
	OutputDebugStringW( L"ScrollPart" );
}

// SelectionChanged event - Fired after a new item has been selected.
void OnSelectionChangedGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"SelectionChanged" );
}

// Sort event - Fired when the control sorts a column.
void OnSortGrid1()
{
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	OutputDebugStringW( L"Sort" );
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->Images(_bstr_t("gBJJgBAIEAAGAEGCAAhb/hz/EIAh8Tf5CJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1BAmBhOCwMGwuDw2ExWJxmIx2HyGLv+TlykUCgABmGYzzObzuczWcKujzOa0ug02h" +
"z+r1Wtz2qoCA2QAYG1yk02YA3NMy2Yh8Sh202zx4gA4jxADM5XG4vHACy6ESdjM6XUZiZTMS5bwZSm1c83+yQHCYHk81Q8O7qW18u/9NG3vAf/y83u4PQWQA0ZVADq/z" +
"6um6rkuw7TqH+5bYJu+z5vE8z2N02cGweoDfwfCrbQfBqkNzBb6QfDLxp6+LlOs5cSOTEzlm7FYACFFwADvGIAGvGjzOu7MbwHHECQSmUOvS8cGwk20gQc2ycQs4MLvL" +
"D8MNtDSfyS+cmyZJzywa96axzDsTw6/x1AAL8xRbF8Vm65jkH/AL8QFNTqR6lsfuDIb2uDKTzTo88FTtIk+PK3SNRDKiew5JVDSnK08NnOUGRClkt0PFEDUjMwAENS4A" +
"M2zj4udNznujT1PTgjdGQg8c71RPtESvCL1JrO8lozQUj1nP6d1TKtc0U8dS1jCaNRzGhrxnGthWJYdjUrYwc2ZMMx2NB8czZNk4VLPMstzXD6Q6mltVjPNAT0m1CvnD" +
"tBxBXlI3PRKNzZDtjQ6cd5TQ/TSU0/r/udC0A1Ez1SUja8/QhWVavrSLfpxWNzXZR2CygmVtXXVl03Lg+BV+lV3UjeDgzEL4AXkcb6Pje5LZNDzhuLfrOX/RtT0TQbc5" +
"lENSvBi2K5xlFdUHhN1ZhJ9F59WybOU7NjWTFkvxhGT9zIIQAWYHIABFqmnABSsT0HUaNYlI1dZmjNuUDRybzvIVWyDoOc54n8Oyxm9Ta9cSUaLbbg44+b4xiO9nY/pt" +
"73u38Tuc52tpdruYxDVyUbBV+gYpu2c7PyGMKTt21cjnW6OvzO8PppUvP/Ljlt/wt/Vvn+v8V1eCdbgaa7fnMi8vyD0TnzGEJXyp/wJ3js98iXe+F3/hwGM3jeQZjTeU" +
"znmOT5bTKJyqYcbm2c5bzXpqvsWw4FUkCO473wgB8cD9/znzO14n1+D4/efcTP4fl5+WKvxbbptmqV+B/ni/68R4514AvxeTAR50B3oPNei/iBhFgfErgeR4kBIiSAAJ" +
"KSiC7PT5wMKIQ4fwfyHDzg2PwD4/B/jgg2PgA48AfjgB+RkeAARwAPGAA8jI4AADgAOMAAZGTyw6YbDkA7ZDaAHgxDyCxGgBw8EBBmJcS4LjAATDweBGoqjgAGP4jQ/A" +
"cjwAHBsiQex8gPH+MF7pDxxkB");
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
spGrid1->PutLinesAtRoot(EXGRIDLib::exLinesAtRoot);
spGrid1->PutGridLineStyle(EXGRIDLib::exGridLinesHDash);
spGrid1->PutAutoEdit(VARIANT_FALSE);
spGrid1->PutExpandOnDblClick(VARIANT_FALSE);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Column")));
		var_Column->PutDisplayFilterButton(VARIANT_TRUE);
		var_Column->PutDef(EXGRIDLib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->GetEditor()->PutEditType(EXGRIDLib::EditType);
	EXGRIDLib::IColumnPtr var_Column1 = ((EXGRIDLib::IColumnPtr)(var_Columns->Add(L"Button")));
		var_Column1->PutAllowSizing(VARIANT_FALSE);
		var_Column1->PutWidth(18);
		var_Column1->PutDef(EXGRIDLib::exCellHasButton,VARIANT_TRUE);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	long h = var_Items->AddItem("parent");
	var_Items->PutCellImage(h,long(0),1);
	var_Items->InsertItem(h,"","child");
	var_Items->PutExpandItem(h,VARIANT_TRUE);
spGrid1->EndUpdate();

708
Is it possible to select a column instead sorting it

// ColumnClick event - Fired after the user clicks on column's header.
void OnColumnClickGrid1(LPDISPATCH   Column)
{
	// Column.Selected = True
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->BeginUpdate();
	spGrid1->GetColumns()->GetItem(long(0))->PutSelected(VARIANT_FALSE);
	spGrid1->GetColumns()->GetItem(long(1))->PutSelected(VARIANT_FALSE);
	spGrid1->GetItems()->SelectAll();
	spGrid1->EndUpdate();
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutMarkSearchColumn(VARIANT_FALSE);
spGrid1->PutShowFocusRect(VARIANT_FALSE);
spGrid1->PutSingleSel(VARIANT_FALSE);
spGrid1->PutFullRowSelect(EXGRIDLib::exRectSel);
spGrid1->PutSortOnClick(EXGRIDLib::exNoSort);
EXGRIDLib::IColumnsPtr var_Columns = spGrid1->GetColumns();
	var_Columns->Add(L"Column1");
	var_Columns->Add(L"Column2");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem("One"),long(1),"Three");
	var_Items->PutCellValue(var_Items->AddItem("Two"),long(1),"Four");
	var_Items->SelectAll();
spGrid1->EndUpdate();

707
Is it possible to display empty strings for 0 values

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Currency")));
	var_Column->PutFormatColumn(L"dbl(value) ? currency(dbl(value)) : ``");
	EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXGRIDLib::EditType);
		var_Editor->PutNumeric(EXGRIDLib::exFloat);
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(double(1.23));
	var_Items->AddItem(double(2.34));
	var_Items->AddItem(long(0));
	var_Items->AddItem(double(10000.99));

706
Is it possible to display empty strings for 0 values

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->GetColumns()->Add(L"Number");
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Currency")))->PutComputedField(L"%0 ? currency(%0) : ``");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(double(1.23));
	var_Items->AddItem(double(2.34));
	var_Items->AddItem(long(0));
	var_Items->AddItem(double(10000.99));

705
How can I get the list of items as they are displayed

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutBackColorAlternate(RGB(240,240,240));
spGrid1->GetColumns()->Add(L"Names");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem("Mantel");
	var_Items->AddItem("Mechanik");
	var_Items->AddItem("Motor");
	var_Items->AddItem("Murks");
	var_Items->AddItem("Märchen");
	var_Items->AddItem("Möhren");
	var_Items->AddItem("Mühle");
spGrid1->GetColumns()->GetItem(long(0))->PutSortOrder(EXGRIDLib::SortAscending);
spGrid1->EndUpdate();
OutputDebugStringW( _bstr_t(spGrid1->GetItems(long(1))) );

704
Is it possible to add new rows, as I type like in Excel

// EditClose event - Occurs when the edit operation ends.
void OnEditCloseGrid1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'
		#import <ExGrid.dll>
		using namespace EXGRIDLib;
	*/
	EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
	spGrid1->GetItems()->AddItem("");
}

EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutAutoEdit(VARIANT_TRUE);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Default")))->GetEditor()->PutEditType(EXGRIDLib::EditType);
spGrid1->PutFullRowSelect(EXGRIDLib::exColumnSel);
spGrid1->GetItems()->AddItem("");
spGrid1->PutDrawGridLines(EXGRIDLib::exAllLines);
spGrid1->PutScrollBars(EXGRIDLib::exDisableBoth);
spGrid1->EndUpdate();

703
Is posible to reduce the size of the picture to be shown in the column's caption

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
spGrid1->PutHTMLPicture(L"pic1","c:\\exontrol\\images\\zipdisk.gif");
spGrid1->PutHeaderHeight(48);
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"DefaultSize")))->PutHTMLCaption(L"Default-Size <img>pic1</img> Picture");
((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"CustomSize")))->PutHTMLCaption(L"Custom-Size <img>pic1:16</img> Picture");
spGrid1->EndUpdate();

702
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
spGrid1->BeginUpdate();
EXGRIDLib::IConditionalFormatPtr var_ConditionalFormat = spGrid1->GetConditionalFormats()->Add(L"1",vtMissing);
	var_ConditionalFormat->PutBold(VARIANT_TRUE);
	var_ConditionalFormat->PutForeColor(RGB(255,0,0));
	var_ConditionalFormat->PutApplyTo(EXGRIDLib::FormatApplyToEnum(0x1));
spGrid1->GetColumns()->Add(L"C1");
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"C2")));
	var_Column->PutHeaderBold(VARIANT_TRUE);
	var_Column->PutHTMLCaption(L"<fgcolor=FF0000>C2");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->PutCellValue(var_Items->AddItem(long(10)),long(1),long(11));
	var_Items->PutCellValue(var_Items->AddItem(long(12)),long(1),long(13));
spGrid1->EndUpdate();

701
How can I filter the check-boxes (method 2)

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXGRIDLib' for the library: 'ExGrid 1.0 Control Library'

	#import <ExGrid.dll>
	using namespace EXGRIDLib;
*/
EXGRIDLib::IGridPtr spGrid1 = GetDlgItem(IDC_GRID1)->GetControlUnknown();
EXGRIDLib::IColumnPtr var_Column = ((EXGRIDLib::IColumnPtr)(spGrid1->GetColumns()->Add(L"Check")));
	EXGRIDLib::IEditorPtr var_Editor = var_Column->GetEditor();
		var_Editor->PutEditType(EXGRIDLib::CheckValueType);
		var_Editor->PutOption(EXGRIDLib::exCheckValue2,long(1));
	var_Column->PutDisplayFilterButton(VARIANT_TRUE);
	var_Column->PutDisplayFilterPattern(VARIANT_FALSE);
	var_Column->PutCustomFilter(L"checked||-1|||unchecked||0");
EXGRIDLib::IItemsPtr var_Items = spGrid1->GetItems();
	var_Items->AddItem(VARIANT_TRUE);
	var_Items->AddItem(VARIANT_TRUE);
	var_Items->AddItem(VARIANT_FALSE);
	var_Items->AddItem(VARIANT_TRUE);
	var_Items->AddItem(VARIANT_FALSE);
	var_Items->AddItem(VARIANT_TRUE);
	var_Items->AddItem(VARIANT_FALSE);